home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_01
/
1101094c
< prev
next >
Wrap
Text File
|
1992-11-01
|
637b
|
31 lines
// fa3.h - a dynamic array of float with operator[]
// as both const and non-const member functions
#include <iostream.h>
class float_array
{
public:
float_array(size_t n = 0);
float_array(const float_array &fa);
~float_array();
float_array &operator=(const float_array &fa);
const float &operator[](size_t i) const;
float &operator[](size_t i);
inline size_t length() const;
private:
float *array;
size_t len;
};
ostream &operator<<
(ostream &os, const float_array &fa);
inline size_t float_array::length() const
{
return len;
}
----------